function loginout() {
    var token = $("#token").val();
    if(isempty(token)) {
        location.href = "/except/login.jsp";
        return;
    }
    var jsonstr = "{token:" + token + "}";
    var url = "/except/usercontroller/loginout.action";
    $.ajax({
        url: url,
        type: 'post',
        dataType: "json",
        data: {
            json: jsonstr
        },
        async: false,
        success: function (data) {
            location.href = "/except/files/home_page.jsp";
        },
        error: function (data) {
            location.href = "/except/files/home_page.jsp";
        }
    });
}